#一·尝试用户输入学生一周的课表信息，尝试用占位符，2种fomat打印学生信息

# 1）用户输入学生一周课表信息

_Monday_ = "3-5网站运营与管理/8-9数媒协作/10-11大英"
_Tuesday_ = "3-4数媒协作/8-10毛概理论/12-13网页设计"
_Wednesday_ = "6-7大英/12-14python"
_Thursday_ = "2-3科学技术与发展/8-9网页设计/10-11乒乓球/12-14API"
_Friday_ = "1-3计算基础应用/6-7毛概实践"
_Saturday_ = "无课"
_Sunday_ = "无课"

Monday = input("周一:")
Tuesday = input("周二:")
Wednesday = input("周三:")
Thursday = input("周四:")
Friday = input("周五:")
Saturday = input("周六:")
Sunday = input("周日:")


if Monday == _Monday_ and Tuesday == _Tuesday_ and Wednesday == _Wednesday_ and Thursday == _Thursday_ and Friday == _Friday_ and Saturday == _Saturday_ and Sunday == _Sunday_:
    print("一周课表信息","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday")
else:
    print('课表信息错误')



# 2）fomat 方法
#format方法1

name = input("请输入名字:")
birthday = input("生日:")
EducationalBackground = input("学历:")
StudentNO = input("学号:")

info_03 =  '''-------INFO OF {0} -------
name:{小张}
birthday:{12.21}
EducationalBackground:{本科在读}
StudentNo:{1910000111}
'''.format(name,
           birthday,
           EducationalBackground ,
           StudentNO)
print(info_03)

#format 方法2
name = input("name:")
birthday = input("birthday:")
EducationalBackground = input("EducationalBackground:")
StudentNO = input("StudentNO:")

info = '''------info ''' + name + ''' -------
name:'''+name+'''
birthday:'''+birthday+'''
EducationalBackground:'''+EducationalBackground+'''
StudentNO:'''+StudentNO+'''
'''
print(info)

#3) 占位符 %s %d
name = input("name:")
Age = input("Age:")
EducationalBackground = input("EducationalBackground:")
StudentNO = input("StudentNO:")
info_02 = '''------info %s-------
name:%s
Age:%d
EducationalBackground:%s
StudentNO :%s
'''% (name,Age,EducationalBackground,StudentNO)
print(info_02)


#二.课表信息

a=input("输入星期几的课表，可打印当天的课表")
if a == "monday":
    print(monday)
elif a == "tuesday":
    print(tuesday)
elif a == "wednesday":
    print(wednesday)
elif a == "thursday":
    print(thursday)
elif a == "friday":
    print(friday)
elif a == "saturday":
    print(saturday)
elif a == "sunday":
    print(sunday)




#三.python内置数据结构 列表切片，方法练习
#1）列表
numbers = ["5","6","7"]
print(numbers)
numbers.append("8")
print(numbers)
numbers.insert(2,"9")
print(numbers)
numbers.pop()
print(numbers)
numbers.pop(1)
print(numbers)
numbers.remove("5")
print(numbers)
numbers[0]
print(numbers)
_numbers ="6"
if _numbers in numbers:
    print(numbers.index(_numbers))
else:
    print("%s 不在我们的列表中" % (_numbers))
print(numbers)

#2）列表切片
numbers = ["5","6","7","8","9","10"]
print(numbers[0],numbers[3])
print(numbers[1:3])
print(numbers[0:3])
print(numbers[:3])
print(numbers[-3:-1])
print(numbers[-3:])
numbers.clear()
print(numbers)

b=[1,1,1,3,2,5,6,7,6,6]
print(b.count(6))


#四.完成课本练习
vowels = ['a','e','i','o','u']
word = "milliways"
for letter in word:
    if letter in vowels:
        print(letter)


vowels = ['a','e','i','o','u']
word = "milliways"
found = []
for letter in word:
    if letter in vowels:
        if letter not in found:
            found.append(letter)
for vowels in found:
        print(vowels)


owels = ['a','e','i','o','u']
word = input("provide a word to search for vowels:")
found = []
for letter in word:
    if letter in vowels:
        if letter not in found:
            found.append(letter)
for vowels in found:
        print(vowels)

phrase = "Don't panic!"
plist = list(phrase)
print(phrase)
print(plist)

for i in range(4):
    plist.pop()
plist.pop(0)
plist.remove("'")
plist.extend([plist.pop(),plist.pop()])
plist.insert(2,plist.pop(3))

new_phrase = ''.join(plist)
print(plist)
print(new_phrase)

phrase = "Don't panic!"
plist = list(phrase)
print(phrase)
print(plist)

new_phrase = ''.join(plist[1:3])
new_phrase = new_phrase +''.join([plist[5],plist[4],plist[7],plist[6]])
print(plist)
print(new_phrase)


paranoid_android = "marvin"
letter = list(paranoid_android)
for char in letter:
    print('/t',char)

paranoid_android = "marvin, the Paranoid Android"
letter = list(paranoid_android)
for char in letter[:6]:
    print('/t',char)
print()
for char in letter[-7:]:
    print('/t'*2,char)
print()
for char in letter[12:20]:
    print('/t'*3,char)






























